1 /* 2 * This file is part of gtkD. 3 * 4 * gtkD is free software; you can redistribute it and/or modify 5 * it under the terms of the GNU Lesser General Public License 6 * as published by the Free Software Foundation; either version 3 7 * of the License, or (at your option) any later version, with 8 * some exceptions, please read the COPYING file. 9 * 10 * gtkD is distributed in the hope that it will be useful, 11 * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 * GNU Lesser General Public License for more details. 14 * 15 * You should have received a copy of the GNU Lesser General Public License 16 * along with gtkD; if not, write to the Free Software 17 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110, USA 18 */ 19 20 // generated automatically - do not change 21 // find conversion definition on APILookup.txt 22 // implement new conversion functionalities on the wrap.utils pakage 23 24 25 module glib.Version; 26 27 private import glib.Str; 28 private import glib.c.functions; 29 public import glib.c.types; 30 31 32 /** */ 33 public struct Version 34 { 35 36 /** 37 * Checks that the GLib library in use is compatible with the 38 * given version. 39 * 40 * Generally you would pass in the constants %GLIB_MAJOR_VERSION, 41 * %GLIB_MINOR_VERSION, %GLIB_MICRO_VERSION as the three arguments 42 * to this function; that produces a check that the library in use 43 * is compatible with the version of GLib the application or module 44 * was compiled against. 45 * 46 * Compatibility is defined by two things: first the version 47 * of the running library is newer than the version 48 * `@required_major.required_minor.@required_micro`. Second 49 * the running library must be binary compatible with the 50 * version `@required_major.@required_minor.@required_micro` 51 * (same major version.) 52 * 53 * Params: 54 * requiredMajor = the required major version 55 * requiredMinor = the required minor version 56 * requiredMicro = the required micro version 57 * 58 * Returns: %NULL if the GLib library is 59 * compatible with the given version, or a string describing the 60 * version mismatch. The returned string is owned by GLib and must 61 * not be modified or freed. 62 * 63 * Since: 2.6 64 */ 65 public static string checkVersion(uint requiredMajor, uint requiredMinor, uint requiredMicro) 66 { 67 return Str.toString(glib_check_version(requiredMajor, requiredMinor, requiredMicro)); 68 } 69 }